<template>
  <div class="song_list_item">
    <div class="pic">
      <img :src="pic" alt />
      <div v-if="playCount" class="play_count">{{playCount | FormatNumber}}</div>
      <i class="play_icon" v-if="type==='song'"></i>
    </div>
    <div class="til line-clamp2">{{name}}</div>
  </div>
</template>

<script>
export default {
  props: {
    playCount: Number, //播放次数
    name: String, //卡片名称
    pic: String, //图片url
    type:String, //卡片类型
  }
};
</script>

<style lang="scss" scoped>
.pic {
  position: relative;
  img {
    border:1px solid #f3f3f3;
    border-radius: 4px;
    width: 100%;
    height: 100%;
    vertical-align: middle;
  }
  .play_count {
    position: absolute;
    right: 8px;
    top: 2px;
    color: #fff;
  }
  .play_icon{
    position: absolute;
    right: 5px;
    bottom: 5px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
  }
}
.til {
  color: $higColor;
}
</style>